---
title: Eclipse Vert.x 3.5.1 released!
category: releases
authors:
  - name: Julien Viet
    github_id: vietj
summary: We have just released Vert.x 3.5.1!
---

We have just released Vert.x 3.5.1!

## Fixes first!

As usual this release fixes bugs reported in 3.5.0, see the release notes.

## JUnit 5 support

This release introduces the new [vertx-junit5 module](https://github.com/vert-x3/vertx-junit5).

[JUnit 5](http://junit.org/junit5/) is a rewrite of the famous Java testing framework that brings new interesting features, including:

* nested tests,
* the ability to give a human-readable description of tests and test cases (and yes, even use emojis),
* a modular extension mechanism that is more powerful than the JUnit 4 runner mechanism (@RunWith annotation),
* conditional test execution,
* parameterized tests, including from sources such as CSV data,
* the support of Java 8 lambda expressions in the reworked built-in assertions API,
* support for running tests previously written for JUnit 4.

Suppose that we have a `SampleVerticle` verticle that exposes a HTTP server on port 11981.
Here is how we can test its deployment as well as the result of 10 concurrent HTTP requests:

```java
@Test
@DisplayName("🚀 Deploy a HTTP service verticle and make 10 requests")
void useSampleVerticle(Vertx vertx, VertxTestContext testContext) {
  WebClient webClient = WebClient.create(vertx);
  Checkpoint deploymentCheckpoint = testContext.checkpoint();

  Checkpoint requestCheckpoint = testContext.checkpoint(10);
  vertx.deployVerticle(new SampleVerticle(), testContext.succeeding(id -> {
    deploymentCheckpoint.flag();

    for (int i = 0; i < 10; i++) {
      webClient.get(11981, "localhost", "/")
        .as(BodyCodec.string())
        .send(testContext.succeeding(resp -> {
          testContext.verify(() -> {
            assertThat(resp.statusCode()).isEqualTo(200);
            assertThat(resp.body()).contains("Yo!");
            requestCheckpoint.flag();
          });
        }));
    }
  }));
}
```

The test method above benefits from the injection of a working `Vertx` context, a `VertxTestContext` for dealing with
asynchronous operations, and the guarantee that the execution time is bound by a timeout which can optionally be configured
using a `@Timeout` annotation.

The test succeeds when all checkpoints have been flagged.
Note that `vertx-junit5` is agnostic of the assertions library being used: you may opt for the built-in JUnit 5 assertions
or use a 3rd-party library such as [AssertJ](http://joel-costigliola.github.io/assertj/) as we did in the example above.

You can checkout the [source on GitHub](https://github.com/vert-x3/vertx-junit5), read [the manual](/docs/vertx-junit5/java/) and learn from [the examples](https://github.com/vert-x3/vertx-examples/tree/master/junit5-examples).

## Web API Contract enhancements

The package `vertx-web-api-contract` includes a variety of fixes, from schema `$ref` to
[revamped documentation](http://vertx.io/docs/vertx-web-api-contract/java/). You can give a look at list of all
[fixes/improvements here](https://github.com/vert-x3/vertx-web/pull/802) and all
[breaking changes here](https://github.com/vert-x3/wiki/wiki/3.5.1-Breaking-Changes#vertx-web-api-contracts).

From 3.5.1 to load the openapi spec and instantiate the Router you should use new method `OpenAPI3RouterFactory.create()`
that replaces old methods `createRouterFactoryFromFile()` and `createRouterFactoryFromURL()`. This new method accepts
relative paths, absolute paths, local URL with `file://` and remote URL with `http://`. Note that if you want refeer to
a file relative to your jar's root, you can simply use a relative path and the parser will look out the jar and into the
jar for the spec.

From 3.5.1 all settings about `OpenAPI3RouterFactory` behaviours during router generation are inglobed in a new object called
[`RouterFactoryOptions`](http://vertx.io/docs/apidocs/io/vertx/ext/web/api/contract/RouterFactoryOptions.html). From
this object you can:

* Configure if you want to mount a default validation failure handler and which one
  (methods `setMountValidationFailureHandler(boolean)` and `setValidationFailureHandler(Handler)`)
* Configure if you want to mount a default 501 not implemented handler and which one
  (methods `setMountNotImplementedFailureHandler(boolean)` and `setNotImplementedFailureHandler(Handler)`)
* Configure if you want to mount `ResponseContentTypeHandler` automatically
  (method `setMountResponseContentTypeHandler(boolean)`)
* Configure if you want to fail during router generation when security handlers are not configured
  (method `setRequireSecurityHandlers(boolean)`)

After initialization of route, you can mount the `RouterFactoryOptions` object with method `routerFactory.setOptions()`
when you want before calling `getRouter()`.

## RxJava deprecation removal

It is important to know that 3.5.x will be the last release with the legacy `xyzObservable()` methods:

```java
@Deprecated()
public Observable<HttpServer> listenObservable(int port, String host);
```

has been replaced since Vert.x 3.4 by:

```java
public Single<HttpServer> rxListen(int port, String host);
```

The `xyzObservable()` deprecated methods will be [removed](https://github.com/vert-x3/vertx-rx/issues/113) in Vert.x 3.6.

## Wrap up

Vert.x 3.5.1 release notes and breaking changes:

* https://github.com/vert-x3/wiki/wiki/3.5.1-Release-Notes
* https://github.com/vert-x3/wiki/wiki/3.5.1-Breaking-Changes

The event bus client using the SockJS bridge are available from NPM, Bower and as a WebJar:

* https://www.npmjs.com/package/vertx3-eventbus-client
* https://github.com/vert-x3/vertx-bus-bower
* http://www.webjars.org/

Docker images are also available on the [Docker Hub](https://hub.docker.com/u/vertx/). The Vert.x distribution is also available from [SDKMan](http://sdkman.io/index.html) and [HomeBrew](http://brew.sh/).

The artifacts have been deployed to [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Cg%3A%22io.vertx%22%20AND%20v%3A%223.5.1%22) and you can get the distribution on [Bintray](https://bintray.com/vertx/downloads/distribution/3.3.3/view).

Happy coding !
